<?php
/**
 * Created by Zhy
 * User: Zhy
 * Date: 2018/5/11
 * Time: 14:00
 */

namespace app\admin\model;


use think\Model;

class User extends Model
{
    /**
     * 查询所有记录
     * @param $page  页数
     * @param $rows  每页显示的条数
     * @return mixed
     */
    public static function getUserList($page, $rows)
    {
        $userList = self::limit($rows * ($page - 1), $rows)->select();
        return $userList;
    }
    
    /**
     * 统计所有记录的条数
     * @return int
     */
    public static function getTotalNum(){
        $total = self::count();
        return $total;
    }
}